// types/video.ts
export interface Video {
  id: number
  author_id: string
  author_name: string
  author_avatar: string
  title: string
  cover_url: string
  play_url: string
  like_num: number
  comment_num: number
  favorite_num: number
  share_num: number
  type: number
  tag_names: string[]
  created_at: string
  followed: boolean
  favorited: boolean
  liked: boolean
}

export interface VideoComment {
  id: number
  work_id: number
  parent_id: number
  content: string
  created_at: string
  like_num: number
}

export interface VideoUpload {
  title: string
  description: string
  videoFile: File
  coverFile?: File
}

export interface SearchParams {
  page?: number
  pageSize?: number
  // [key: string]: any // 其他可能的查询参数
}

export interface VideoListResponse {
  total: number
  total_page: number
  current_page: number
  page_size: number
  data: Video[]
}

export interface CommentListResponse {
  total: number
  list: VideoComment[]
}

export interface ImageResponse {
  total: number
  list: WorkImage[]
}

export interface WorkImage {
  index: number
  url: string
  cover: boolean
}

export interface LikeResponse {
  code: number
  msg: string
}

export interface CommentResponse {
  code: number
  msg: string
}

export interface FavoriteResponse {
  code: number
  msg: string
}

export interface FollowResponse {
  code: number
  msg: string
}
